package com.easy.service.impl;

import com.easy.bean.User;
import com.easy.dao.UserDao;
import com.easy.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
   @Autowired
    UserDao userDao;
    @Override
    public User getUserByID(Integer id) {
        return userDao.getUserByID(id);

    }

    @Override
    public int editUser(User user) {
        return userDao.editUser(user);
    }

    @Override
    public User getUser(User user) {
        return userDao.getUserByUsername(user.getUsername());
    }

    @Override
    public int add(User user) {
        return userDao.add(user);
    }


}
